<link rel="stylesheet" href="libs/codemirror/lib/codemirror.css"> 
<script src="libs/codemirror/lib/codemirror.js"></script> 
<script src="libs/codemirror/mode/xml/xml.js"></script> 
<link rel="stylesheet" href="libs/codemirror/mode/xml/xml.css"> 
<script src="libs/codemirror/mode/javascript/javascript.js"></script> 
<link rel="stylesheet" href="libs/codemirror/mode/javascript/javascript.css"> 
<script src="libs/codemirror/mode/css/css.js"></script> 
<link rel="stylesheet" href="libs/codemirror/mode/css/css.css"> 
<script src="libs/codemirror/mode/clike/clike.js"></script> 
<link rel="stylesheet" href="libs/codemirror/mode/clike/clike.css"> 
<script src="libs/codemirror/mode/php/php.js"></script> 

<!--CODEMIRROR--------------------------------------------------------------->
<!--MUST BE HERE AFTER LINKING TO CSS & JS FILES-->
<style>
.CodeMirror {
  border:1px solid #bbb; height:auto; width:100%; background:white;
}
</style>

<!--HTML--------------------------------------------------------------------->
<div class="div_page">
<div class="div_page_inner"> 

<div class="div_title"> <?php 
  echo phrase::__("PHP Sandbox"); ?>
</div>
<div>&nbsp;</div>

<form method="post">
Code will run like a page in blank layout, 
classes of Cornice Framework can be used also.<br>
Better remember not even try to run ridiculous code, it's real PHP code.
<div>
<textarea id="txt_php" name="php_code"><?php
if (strlen($this->php_code)>0) {
  echo $this->php_code;
}
else { ?>
&lt;?php
echo sha1("123456");
?><?php
} ?>
</textarea>
</div>
<div>&nbsp;</div>
Note that there must be matching opening & closing PHP tags,<br>
also note that browser may block pop-up<br>
<button type="submit"><?php echo phrase::__("Execute"); ?></button>
</form>

</div>
</div>

